/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rh.game.impl;

import com.rh.game.Location;

import java.util.List;

/**
 *
 * @author Hayden
 */
public class Location1 implements Location {
    private int x = -1;
    public int getX() { return x; }
    
    private int y = -1;
    public int getY()  { return y; }
    
    private String id = "";
    public String getID()  {
        return id;
    }
    
    Location1(String pID, int pX, int pY)  {
        super();
        id = pID;
        x = pX;
        y = pY;
    }

    public static Location valueOf(String pID, int pX, int pY)  {
        if (pID.equals("NULL"))  return Location.NULL;
        return new Location1(pID, pX, pY);
    }
    
    public String toString()  {
        return getID() + " [" + getX() + ", " + getY() + "]";
    }
}
